﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MHYS.DEMO.Model;
namespace MHYS.DEMO.DAL
{
    public class OrderItemService
    {


        /// <summary>
        /// 插入购物单
        /// </summary>
        /// <param name="OrderItem">购物单</param>
        /// <returns>是否插入成功</returns>
        public static bool InsertOrderItemList(OrderItem OrderItem)
        {
            try
            {
                string sql = string.Format("INSERT INTO OrderItem VALUES ('{0}','{1}','{2}','{3}') ", OrderItem.ProductID, OrderItem.PayMoney, OrderItem.Num, OrderItem.OrderID);
                if (DBHelper.ExecNonQuery(sql))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                return false;
            }

        }


    }
}
